from dataclasses import dataclass


@dataclass
class CustomException(Exception):
    def __init__(self, msg: str, status_code: int):
        self.msg = msg
        self.status_code = status_code


class DataNotFound(CustomException):
    def __init__(self, msg: str = "数据不存在"):
        super().__init__(msg, 400)


class InvalidParameter(CustomException):
    def __init__(self, msg: str = "参数错误"):
        super().__init__(msg, 400)
